<template>
   <div class="test">
     <div class="testA">
     </div>
   </div>
</template>
<script>
export default {
  mounted () {
    let a = document.querySelector('.test')
    let newDom = document.createElement('div')
    newDom.setAttribute('class', 'testAdd')
    a.appendChild(newDom)
  }
}
</script>
<style>
  .test {
    background: blue;
    height: 100px;
  }
  .test .testA {
    display: inline-block;
    width: 100px;
    height: 100px;
    background: green;
  }
  .test .testAdd {
    background: red;
    height: 100px;
    display: inline-block;
    width: 100px;
  }
</style>
